#ifndef __PID_H__
#define __PID_H__

#include "main.h"

typedef struct pid
{
	float Kp;
	float Ki;
	float Kd;
  float E_sum;
	float MAX;
	float MIN;
  float Error[2];
	float delta_t;
}positionpid;

void PID_Init(positionpid *PID,float Kp,float Ki,float Kd,float T,float MAX,float MIN);
float PID(positionpid *PID,float SET,float Actual);

#endif